package com.hjc.service.impl;

import com.hjc.entity.Unit;
import com.hjc.mapper.UnitMapper;
import com.hjc.service.UnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UnitServiceImpl implements UnitService {
    @Autowired
    private UnitMapper unitMapper;

    @Cacheable("'all:unit'")
    @Override
    public List<Unit> findAllUnit() {
        return unitMapper.selectAllUnit();
    }
}
